public class t63 {
    public static void main(String[] args) {
        int obstacleGrid[][] ={{0,0,0},{0,1,0},{0,0,0}};
        int dp [][] = new int [obstacleGrid.length][obstacleGrid[0].length];
        for(int i = 0 ; i<obstacleGrid.length ; i++){
            for(int j = 0; j<obstacleGrid[i].length ; j++){
                if(i ==0 && j==0){
                    dp[i][j] = 1;
                    continue;
                }
                if(obstacleGrid[i][j] == 1){
                    dp[i][j] = 0;
                }else{
                    if(i>0){
                        dp[i][j] += dp[i-1][j];
                    }
                    if(j>0){
                        dp[i][j] += dp[i][j-1];
                    }
                }
            }
        }
        System.out.println(dp[obstacleGrid.length-1][obstacleGrid[0].length-1]);
    }
}


